import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
export default new Vuex.Store({
  state: {
    list: '',
    isLogin: false,
    isHot: false,
    goodsNum: 0,
    goodsName: '',
    goodsColor: '',
    goodsMemory: '',
    goods_price: 0,
    sku: 0,
    userPhone: '',
    passWord: '',
    userNum: '',
    orderNum: '',
    nickName: '',
    times: '',
    topImg: '',
    isReal: false,
    partition: '',
    partitionImg: ''
  },
  mutations: {
    SET_LIST (state, list) {
      state.list = list
    },
    login (state, isLogin) {
      state.isLogin = isLogin
    },
    // 退出
    logout (state, isLogin) {
      state.isLogin = false
    }
  }
})
